package com.zhang.backend.service.impl;

import com.zhang.backend.model.domain.Orders;
import com.zhang.backend.mapper.OrderMapper;
import com.zhang.backend.model.domain.OrderProduct;
import com.zhang.backend.service.OrderProductService;
import com.zhang.backend.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zyx
 * @since 2021-12-22
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Orders> implements OrderService {

    @Autowired
    OrderProductService orderProductService;
    @Override
    public void insert(List<OrderProduct> products) {
        orderProductService.saveBatch(products);
    }
}
